{% extends 'base.html' %}
{% block title %}修改密码{% endblock %}
{% block css %}{% endblock %}
{% block page_title %}修改密码{% endblock %}
{% block breadcrumb %}
    <li>
        <a href="{% url 'index' %}">驾驶舱</a>
    </li>
    <li>
        <a href="javascript:void(0)">个人中心</a>
    </li>
    <li>
        <strong>修改密码</strong>
    </li>
{% endblock %}
{% block page-content %}

    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3>修改密码</h3>
                </div>
                <div class="panel-body">
                    <form class="form-horizontal" action="" method="post">
                        <p style="margin-bottom: 10px">请输入你的旧密码，为了安全起见，接着要输入两遍新密码，以便我们校验你输入的是否正确。</p>
                        {% csrf_token %}
                        <div class="form-group {% if form.errors.old_password %}has-error{% endif %}">
                            <label class="col-lg-2 control-label">旧密码:</label>
                            <div class="col-lg-4">
                                <input type="password" class="form-control" name="old_password">
                                {% if form.errors.old_password %}
                                    <span class="help-block m-b-none">{% for error in form.errors.old_password %}
                                        {{ error }}{% endfor %}</span>
                                {% endif %}
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group {% if form.errors.password %}has-error{% endif %}">
                            <label class="col-lg-2 control-label">新密码:</label>
                            <div class="col-lg-4">
                                <input type="password" class="form-control" name="password">
                                {% if form.errors.password %}
                                    <span class="help-block m-b-none">{% for error in form.errors.password %}
                                        {{ error }}{% endfor %}</span>
                                {% endif %}
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group {% if form.errors.password2 %}has-error{% endif %}">
                            <label class="col-lg-2 control-label">新密码确认:</label>
                            <div class="col-lg-4">
                                <input type="password" class="form-control" name="password2">
                                {% if form.errors.password2 %}
                                    <span class="help-block m-b-none">{% for error in form.errors.password2 %}
                                        {{ error }}{% endfor %}</span>
                                {% endif %}
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-lg-offset-2 col-lg-4">
                                <button class="btn btn-sm btn-primary" type="submit">修改我的密码</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block js %}{% endblock %}
